package org.wenhuayuan.project.common.view

import android.content.Context
import android.graphics.Typeface
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatButton

/**
 * 可以在布局文件中直接设置 text
 */
class IconFontButton @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet?,
    defStyle:Int
):AppCompatButton(context, attrs, defStyle){
    init {
        val typeface = Typeface.createFromAsset(context.assets, "/fonts/iconfont.ttf")
        setTypeface(typeface)
    }
}